package org.example.lotterysystem.service.enums;

public enum ActivityStatusEnum {
    RUNNING(1,"活动进行中"),

    COMPLETED(2,"活动已完成");

    ActivityStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    private final Integer code;
    private final String message;

    public static ActivityStatusEnum forname(String name){
        for (ActivityStatusEnum activityStatusEnum:ActivityStatusEnum.values()) {
            if(activityStatusEnum.name().equalsIgnoreCase(name)){
                return activityStatusEnum;
            }
        }
        return null;
    }
}
